package org.msn.util;

import org.yaml.snakeyaml.Yaml;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.Map;

public class YamlUtil {
    public static Map<String, Object> read(String root) throws FileNotFoundException {
        String path = root + "/src/main/resources/application.yml";

        Yaml yaml = new Yaml();

        return yaml.loadAs(new FileInputStream(path), Map.class);
    }
}
